// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// + Copyright (c) Holger Buss, Ingo Busker
// + only for non-profit use
// + www.MikroKopter.com
// + porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed
// + see the File "License.txt" for further Informations
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#include "main.h"
#include "eeprom.h"

char DisplayBuff[80] = "Hello World";
unsigned char DispPtr = 0;

unsigned char MaxMenue = 17;
unsigned char MenuePunkt = 0;
unsigned char RemoteKeys = 0;

#define KEY1    0x01
#define KEY2    0x02
#define KEY3    0x04
#define KEY4    0x08
#define KEY5    0x10

void LcdClear(void)
{

}

void Menu_Putchar(char c)
{
	
}

void Menu(void)
 {
  if(RemoteKeys & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue;}
  if(RemoteKeys & KEY2) { if(MenuePunkt == MaxMenue) MenuePunkt = 0; else MenuePunkt++;}
  if((RemoteKeys & KEY1) && (RemoteKeys & KEY2)) MenuePunkt = 0;
  LcdClear();
  if(MenuePunkt < 10) {LCD_printfxy(17,0,"[%i]",MenuePunkt);}
  else {LCD_printfxy(16,0,"[%i]",MenuePunkt);};

  switch(MenuePunkt)
   {
    case 0:
       
		   if(VersionInfo.HardwareError[0]);// LCD_printfxy(0,3,"Hardware Error 1:%d !!",VersionInfo.HardwareError[0])
		   else
           if(MissingMotor);// LCD_printfxy(0,3,"Missing BL-Ctrl:%d!!",MissingMotor)
		   else
           if(VersionInfo.HardwareError[1] & FC_ERROR1_MIXER);// LCD_printfxy(0,3,"Mixer Error!")
		   else
//		   if(VersionInfo.HardwareError[1]) LCD_printfxy(0,3,"Error 2:%d !!",VersionInfo.HardwareError[1])
//		   else
           if(I2CTimeout < 6) ;//LCD_printfxy(0,3,"I2C ERROR!!!")
           break;

    default:
           if(MenuePunkt == MaxMenue) MaxMenue--;
    	   MenuePunkt = 0;
           break;
    }
    RemoteKeys = 0;
}
